﻿using System;

namespace Haimen.Func1;

internal class WorkshopFunc1(
    AppEnvResolver envResolver,
    HuallExportMerger exportMerger,
    ResultInputFiller inputFiller,
    Func1OutCleaner outCleaner) : WorkshopFuncMain {

  public void Run(EntryArgResult args) {
    AppEnvPath env = _envResolver.Resolve(args);
    string[] groupList = _exportMerger.Merge(env);

    _inputFiller.Fill(env, groupList);
    _outCleaner.Clean(env);

    Console.WriteLine("--- 完成！---");
  }

  readonly AppEnvResolver _envResolver = envResolver;

  readonly HuallExportMerger _exportMerger = exportMerger;
  readonly ResultInputFiller _inputFiller = inputFiller;

  readonly Func1OutCleaner _outCleaner = outCleaner;
}
